﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace ComeSeeThis_MVC2.Models
{
    [MetadataType(typeof(VehicleTypeValidation))]
    public partial class VehicleType
    {
        // Checks if the given user submitted this vehicle type
        public bool WasSubmittedBy(string userName)
        {
            return SubmittedBy.Equals(userName, StringComparison.OrdinalIgnoreCase);
        }
    }
    public class VehicleTypeValidation
    {
        //[Required(ErrorMessage = "Company Name is required")]
        //[StringLength(50, ErrorMessage = "Company name may not be longer than 50 characters")]
        //public string CompanyName { get; set; }
    }

}